package com.hzdl.sbdemo.controller;

import com.hzdl.sbdemo.util.HzdlAjaxResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("error")
@Controller
public class ErrorController {
    @RequestMapping("getJson1")
    @ResponseBody
    public HzdlAjaxResult getJson(){
        return HzdlAjaxResult.ok(null);
    }
    @RequestMapping("getJsonError")
    @ResponseBody
    public HzdlAjaxResult getJson2(){
        int a=2/0;
        return HzdlAjaxResult.ok(null);
    }
    @RequestMapping("test")
    public String test(){
        return "test";
    }
}
